(* FIXME: The arguments are all messed up *)
let aggregate func args times =
    let rec aggregate_helper n acc =
      if n >= times then acc 
      else aggregate_helper (n+1) ((func args) +. acc)
    in
      aggregate_helper 0 0.0
;;
(* The reason why I do not use List.length is that it may take some time to execute, but I am not sure. *)
let list func args times = 
    let rec list_helper n acc =
      if n >= times 
          then acc 
          else list_helper (n+1) ((func args)::acc)
    in
      list_helper 0 []
;;
